#ifndef EDITORCORE_PROPERTY_H
#define EDITORCORE_PROPERTY_H

#include <string>
#include <Common/Common.h>
#include "EditorCore/Property/PropertyValue.h"

namespace editor_core {

	class Property
	{
	public:
		Property( const Property& property );
		Property( int key, const std::string& name, const PropertyValue& value );

		void AddChild( const Property& child );
		void RemoveChild( const Property& child );
		void GetChildren( cmn::ICollection<Property>& children ) const;

		inline int GetKey() const { return m_key; }
		inline std::string GetName() const { return m_name; }

		inline PropertyValue GetValue() const { return m_value; }
		inline void SetValue( const PropertyValue& value ) { m_value = value; }

	private:
		int m_key;
		std::string m_name;
		PropertyValue m_value;

		cmn::Vector<Property> m_children;
	};

	bool operator== ( const Property& a, const Property& b );
	bool operator!= ( const Property& a, const Property& b );
}
#endif
